[action] [PR:25027] [BMC][config_reload] Skip swss readiness gate in config_system_checks_passed#1274
Merged
Conversation
…_passed
### Description of PR
BMC devices (`DEVICE_METADATA.localhost.type == 'NetworkBmc'`) have no front-side ASIC. `swss`/`syncd` are intentionally not running there, so the existing readiness gate in `tests/common/config_reload.py::config_system_checks_passed()` ΓÇö which waits for `systemctl show swss.service --property ActiveState` to be `"active"` ΓÇö never passes.
Result: every reload-using test on BMC (e.g. `platform_tests/test_reload_config.py::test_reload_configuration`, `::test_reload_configuration_checks`) times out the full 360 s window and fails with:
```
AssertionError: System checks did not pass within the allotted time after config reload.
```
This PR short-circuits the swss readiness gate when `duthost.is_bmc()` is true.
`SonicHost.is_bmc()` is the canonical BMC-detection helper already used by `tests/bmc/conftest.py`, `tests/cacl/test_cacl_function.py`, `tests/process_monitoring/test_critical_process_monitoring.py`, and is implemented as a single cached lookup (`self._facts.get('router_type', '') == 'NetworkBmc'`) ΓÇö no extra shell call, no parser risk. Behavior on every non-BMC device is unchanged.
### Verified manifestation
R3 baseline on Komodo BMC (build `internal.161861823-bff76049fe`, 2026-04-28):
| Test | Runtime | Result | Error |
|---|---|---|---|
| `test_reload_configuration[host1-komodo-bmc]` | 424 s | failure | `AssertionError: System checks did not pass within the allotted time after config reload.` |
| `test_reload_configuration_checks[host1-komodo-bmc]` | 614 s | failure | `AssertionError: System checks did not pass within the allotted time after config reload on Delayed services: []` |
Both runtimes are dominated by the 360 s `wait_until` window where `config_system_checks_passed()` returns `False` every 20 s on the swss check.
### Summary
Fixes #
### Type of change
- [x] Bug fix
### Back port request
- [ ] 202012
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
### Approach
#### What is the motivation for this PR?
Stop wasting 6+ minutes per reload-using test on BMC waiting for a service that is intentionally not running.
#### How did you do it?
Wrapped the existing multi-asic / single-asic swss readiness block with `if duthost.is_bmc(): ... else: <existing block>`. No other changes.
#### How did you verify/test it?
- `python3 -m py_compile tests/common/config_reload.py` clean.
- Static review against the failure data above.
- CI will exercise the reload tests on non-BMC platforms.
- Will re-verify `test_reload_configuration[host1-komodo-bmc]` and `::test_reload_configuration_checks` on Komodo BMC after merge.
#### Any platform specific information?
Only affects the path where `DEVICE_METADATA.localhost.type == 'NetworkBmc'`. No-op everywhere else.
#### Supported testbed topology if it's a new test case?
N/A ΓÇö helper change.
### Documentation
N/A
Workitem link: https://msazure.visualstudio.com/One/_workitems/edit/37906237
Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
Collaborator
Author
|
Original PR: sonic-net/sonic-mgmt#25027 |
Collaborator
Author
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
BMC devices (
DEVICE_METADATA.localhost.type == 'NetworkBmc') have no front-side ASIC.swss/syncdare intentionally not running there, so the existing readiness gate intests/common/config_reload.py::config_system_checks_passed()ΓÇö which waits forsystemctl show swss.service --property ActiveStateto be"active"ΓÇö never passes.Result: every reload-using test on BMC (e.g.
platform_tests/test_reload_config.py::test_reload_configuration,::test_reload_configuration_checks) times out the full 360 s window and fails with:This PR short-circuits the swss readiness gate when
duthost.is_bmc()is true.SonicHost.is_bmc()is the canonical BMC-detection helper already used bytests/bmc/conftest.py,tests/cacl/test_cacl_function.py,tests/process_monitoring/test_critical_process_monitoring.py, and is implemented as a single cached lookup (self._facts.get('router_type', '') == 'NetworkBmc') ΓÇö no extra shell call, no parser risk. Behavior on every non-BMC device is unchanged.Verified manifestation
R3 baseline on Komodo BMC (build
internal.161861823-bff76049fe, 2026-04-28):test_reload_configuration[host1-komodo-bmc]AssertionError: System checks did not pass within the allotted time after config reload.test_reload_configuration_checks[host1-komodo-bmc]AssertionError: System checks did not pass within the allotted time after config reload on Delayed services: []Both runtimes are dominated by the 360 s
wait_untilwindow whereconfig_system_checks_passed()returnsFalseevery 20 s on the swss check.Summary
Fixes #
Type of change
Back port request
Approach
What is the motivation for this PR?
Stop wasting 6+ minutes per reload-using test on BMC waiting for a service that is intentionally not running.
How did you do it?
Wrapped the existing multi-asic / single-asic swss readiness block with
if duthost.is_bmc(): ... else: <existing block>. No other changes.How did you verify/test it?
python3 -m py_compile tests/common/config_reload.pyclean.test_reload_configuration[host1-komodo-bmc]and::test_reload_configuration_checkson Komodo BMC after merge.Any platform specific information?
Only affects the path where
DEVICE_METADATA.localhost.type == 'NetworkBmc'. No-op everywhere else.Supported testbed topology if it's a new test case?
N/A ΓÇö helper change.
Documentation
N/A
Workitem link: https://msazure.visualstudio.com/One/_workitems/edit/37906237
Signed-off-by: Sonic Build Admin sonicbld@microsoft.com